<%@ page import="belleza.relativa.Persona" %>



<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'nombre', 'error')} required">
    <label for="nombre">
        <g:message code="persona.nombre.label" default="Nombre"/>
        <span class="required-indicator">*</span>
    </label>
    <g:textField name="nombre" maxlength="100" required="" value="${personaInstance?.nombre}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'apellido', 'error')} required">
    <label for="apellido">
        <g:message code="persona.apellido.label" default="Apellido"/>
        <span class="required-indicator">*</span>
    </label>
    <g:textField name="apellido" maxlength="100" required="" value="${personaInstance?.apellido}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'usuario.user.username', 'error')} required">
    <label for="username">
        <g:message code="user.username.label" default="Usuario"/>
        <span class="required-indicator">*</span>
    </label>
    <g:textField name="username" maxlength="20" required="" value="${personaInstance?.usuario?.username}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'usuario.user.password', 'error')} required">
    <label for="password">
        <g:message code="user.password.label" default="Password"/>
        <span class="required-indicator">*</span>
    </label>
    <g:passwordField name="password" maxlength="20" required="" value="${personaInstance?.usuario?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'email', 'error')} required">
    <label for="email">
        <g:message code="persona.email.label" default="Email"/>
        <span class="required-indicator">*</span>
    </label>
    <g:field type="email" name="email" required="" value="${personaInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'sexo', 'error')} ">
    <label for="sexo">
        <g:message code="persona.sexo.label" default="Sexo"/>

    </label>
    <g:select name="sexo" from="${personaInstance.constraints.sexo.inList}" value="${personaInstance?.sexo}"
              valueMessagePrefix="persona.sexo" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'sexoBuscado', 'error')} ">
    <label for="sexoBuscado">
        <g:message code="persona.sexoBuscado.label" default="Busca"/>

    </label>
    <g:select name="sexoBuscado" from="${personaInstance.constraints.sexoBuscado.inList}" value="${personaInstance?.sexoBuscado}"
              valueMessagePrefix="persona.sexoBuscado" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'biografia', 'error')} ">
    <label for="biografia">
        <g:message code="persona.biografia.label" default="Biografia"/>

    </label>
    <g:textArea name="biografia" cols="40" rows="5" maxlength="255" value="${personaInstance?.biografia}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'fechaNacimiento', 'error')} required">
    <label for="fechaNacimiento">
        <g:message code="persona.fechaNacimiento.label" default="Fecha Nacimiento"/>
        <span class="required-indicator">*</span>
    </label>
    <g:datePicker name="fechaNacimiento" precision="day" value="${personaInstance?.fechaNacimiento}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'pais', 'error')} ">
    <label for="pais">
        <g:message code="persona.pais.label" default="Pais"/>

    </label>
    <g:select name="pais" from="${personaInstance.constraints.pais.inList}" value="${personaInstance?.pais}"
              valueMessagePrefix="persona.pais" noSelection="['': '']"/>
</div>
<div class="fieldcontain ${hasErrors(bean: personaInstance, field: 'fotos', 'error')} ">
    <label for="foto">
        <g:message code="persona.fotos.label" default="Foto principal"/>

    </label>
    <input type="file" id="foto" name="foto"/>
</div>




